package com.ruoyi.returnMaterials_detail.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.returnMaterials_detail.mapper.ErpProductionReturnMaterialDetailMapper;
import com.ruoyi.returnMaterials_detail.domain.ErpProductionReturnMaterialDetail;
import com.ruoyi.returnMaterials_detail.service.IErpProductionReturnMaterialDetailService;

/**
 * 退料Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-07-30
 */
@Service
public class ErpProductionReturnMaterialDetailServiceImpl implements IErpProductionReturnMaterialDetailService 
{
    @Autowired
    private ErpProductionReturnMaterialDetailMapper erpProductionReturnMaterialDetailMapper;

    /**
     * 查询退料
     * 
     * @param id 退料主键
     * @return 退料
     */
    @Override
    public ErpProductionReturnMaterialDetail selectErpProductionReturnMaterialDetailById(Long id)
    {
        return erpProductionReturnMaterialDetailMapper.selectErpProductionReturnMaterialDetailById(id);
    }

    /**
     * 查询退料列表
     * 
     * @param erpProductionReturnMaterialDetail 退料
     * @return 退料
     */
    @Override
    public List<ErpProductionReturnMaterialDetail> selectErpProductionReturnMaterialDetailList(ErpProductionReturnMaterialDetail erpProductionReturnMaterialDetail)
    {
        return erpProductionReturnMaterialDetailMapper.selectErpProductionReturnMaterialDetailList(erpProductionReturnMaterialDetail);
    }

    /**
     * 新增退料
     * 
     * @param erpProductionReturnMaterialDetail 退料
     * @return 结果
     */
    @Override
    public int insertErpProductionReturnMaterialDetail(ErpProductionReturnMaterialDetail erpProductionReturnMaterialDetail)
    {
        return erpProductionReturnMaterialDetailMapper.insertErpProductionReturnMaterialDetail(erpProductionReturnMaterialDetail);
    }

    /**
     * 修改退料
     * 
     * @param erpProductionReturnMaterialDetail 退料
     * @return 结果
     */
    @Override
    public int updateErpProductionReturnMaterialDetail(ErpProductionReturnMaterialDetail erpProductionReturnMaterialDetail)
    {
        return erpProductionReturnMaterialDetailMapper.updateErpProductionReturnMaterialDetail(erpProductionReturnMaterialDetail);
    }

    /**
     * 批量删除退料
     * 
     * @param ids 需要删除的退料主键
     * @return 结果
     */
    @Override
    public int deleteErpProductionReturnMaterialDetailByIds(Long[] ids)
    {
        return erpProductionReturnMaterialDetailMapper.deleteErpProductionReturnMaterialDetailByIds(ids);
    }

    /**
     * 删除退料信息
     * 
     * @param id 退料主键
     * @return 结果
     */
    @Override
    public int deleteErpProductionReturnMaterialDetailById(Long id)
    {
        return erpProductionReturnMaterialDetailMapper.deleteErpProductionReturnMaterialDetailById(id);
    }
}
